package cn.tedu._05mvcboot01.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class UserController {
    /**
     * RequestMapping:请求注解,根据请求的URL地址锁定对应的控制器方法;
     * ResponseBody:响应注解,
     *   1.允许控制器方法以返回值的形式返回给客户端数据;
     *   http://localhost:8080/v1/users/login
     */
    @RequestMapping("v1/users/login")
    @ResponseBody
    public String login(){
        return "恭喜你，登录成功";
    }
}
